"""
    打印九九乘法口诀表
    1X1=1
    1X2=2 2X2=4
    1x3=3 2x3=6 3x3=9
    1x4=4 2x4=8 3x4=12 4x4=16

"""
# print(1,'X',i,'=',(1*i))
i = 1
while i <= 9:  # 控制行
    j = 1
    while j <= i:
        print(f'{i}X{j}={i*j}',end=' ')
        j += 1
    print()
    i += 1

print('=' * 30)

i = 9
while i >=1:  # 控制行
    j = 9
    while j >= 10-i:
        print(f'{i}X{j}={i * j}', end=' ')
        j -=1
    print()
    i -= 1

